<script setup lang="ts">
import {computed} from 'vue';

import {cn} from '@/utils/shared/utils';

import {Label, type LabelProps} from 'radix-vue';

const props = defineProps<{ class?: any } & LabelProps>();

const delegatedProps = computed(() => {
  const {class: _, ...delegated} = props;

  return delegated;
});
</script>

<template>
  <Label
      v-bind="delegatedProps"
      :class="
      cn(
        'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
        props.class,
      )
    "
  >
    <slot></slot>
  </Label>
</template>
